<template>
  <div class="classify">
    <div class="header">

      <router-link
      to="./squery">
      <span class="squery">
        <i class="iconfont">
          <img :src="images1" class="iconss">
        </i>
        <input type="text" placeholder="搜索你想要的宝贝" class="int">
      </span>
      </router-link>
    </div>
     <div class="header-a"></div>
    <div class="new">
      <div class="newshop">最近上新</div>
    </div>
    <div class="chooselist" v-for="item in alllist" :key="item.id">
      <div class="boy">
        <div class="boy-title">{{item.goodsFatherTypeName}}<span class="icons-right"><img :src="images5" class="images5"></span>
          
        <div class="boy-title-list">
             <router-link tag="div" class="boy-title-list-class" v-for="items in item.goodsTypes" :key="items.id" :to="{name:'Mall',
             query:{
              goodsFatherTypeId:item.goodsFatherTypeId,
              id:item.id,
              goodsTypeName:item.goodsTypeName
             }}">{{items.goodsTypeName}}</router-link>
          </div>
        </div>

      </div>
    </div>
  </div>
</template>
<script>
import pic1 from "../../icons/squery.png";

import pic5 from '../../icons/right.png';
import * as api from "../../request/api.js";
export default {
  name: "List",
  data() {
    return {
      images1: pic1,

      images5: pic5,
      alllist:[],
      boylist:['外套','裤子','上衣'],
    };
  },
  created(){
  this.$http({
    method:'post',
    url:api.LISTTWO,
    data:{
      pageNo:1,
      pageSize:10
    }
  })
  .then(resp=>{
    console.log(resp)
    this.alllist=resp.data.data
  })
  .catch(resp=>{
    //  console.log(resp)
  })
  }
};
</script>
<style lang="less" scoped>
@import "../../less/classlist.less";
</style>